//	ID : pallab81
// 	PROG : 10911
// 	LANG : C++
// 	2011-09-08-09.27.53 Thursday
//
// 	"I have not failed, I have just found 10000 ways that won't work.
//


#include <iostream>
#include <algorithm>
#include <vector>
#include <sstream>
#include <fstream>
#include <string>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <functional>
#include <bitset>

#include <ctime>
#include <cassert>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <climits>
#include <cstring>
#include <cstdlib>

using namespace std;

#define VI vector< int >
#define CI( x ) scanf("%d",&x)
#define CL( x ) scanf("%lld",&x)
#define CD( x ) scanf("%lf",&x )
#define foR(i,st,ed) for(int i = st ; i < ed ; ++i )
#define fo(i, ed ) foR( i, 0, ed )
#define foE(i,st,ed) for(int i = st ; i <= ed ; ++i )
#define foit(i, x) for (typeof((x).begin()) i = (x).begin(); i != (x).end(); i++)
#define bip system("pause")
#define Int long long
#define pb push_back
#define SZ(X) (int)(X).size()
#define LN(X) (int)(X).length()
#define mk make_pair
#define f first
#define s second
#define SET( ARRAY , VALUE ) memset( ARRAY , VALUE , sizeof(ARRAY) )

inline void wait( double seconds ){
    double endtime = clock()+( seconds* CLOCKS_PER_SEC );
    while( clock() < endtime ){
        ;
    }
}
int cases;
int N;
double result;
struct NODE{
    int x;
    int y;
    NODE(int x_, int y_):
    x(x_),y(y_){;}
};

vector< NODE > vt;
vector< vector<double> > d;
double dp[ 1<<17 ];
int mask;

inline void Read(){
    string name;int x,y;
    vt.clear();
    N*=2;
    foR(i,0,N){
        cin>>name>>x>>y;
        vt.pb( NODE(x,y) );
    }
}
inline void print(){
    foR(i,0,N){
        foR(j,0,N){
            printf("%.2llf  ",d[i][j]);
        }
        printf("\n");
    }
}
inline double dist(int x1, int y1, int x2, int y2){
    double X = x1-x2;
    double Y = y1-y2;
    return sqrt( X*X + Y*Y );
}
inline void F1(){
    d.assign(N, vector<double>(N,0.) );
    foR(i,0,N){
        foR(j,i+1,N){
            double dd = dist( vt[i].x, vt[i].y, vt[j].x, vt[j].y);
            d[i][j]=d[j][i]=dd;
        }
    }
}


inline void Proc(){
    F1();
    mask = 1<<N;
    for(int i=0; i<mask; ++i){
        dp[i]=1e12;
    }
    dp[0]=0;
    for(int i=0;i<mask; ++i){
            fo(j,N){
                int nw = 1<<j;
                if( (i&nw) !=0 )continue;

                fo(k,N){
                    int nxt = 1<<k;
                    if( (i&nxt) !=0 )continue;
                    if( nw==nxt )continue;
                    int MASK = i|nw|nxt;

                    double cost = dp[i]+ d[j][k];
                    if( cost<dp[MASK] ){
                        dp[MASK]=cost;
                    }
                }
            }
    }

    printf("Case %d: %.2lf\n",cases,dp[ mask-1 ]);
}

int main(){
    #ifndef ONLINE_JUDGE
        freopen("in.txt","rt",stdin);
    #endif

    for(cases=1; scanf("%d",&N)==1 && N!=0  ; ++cases){
        Read();
        Proc();
    }


return 0;
}
